package com.gamex.findit.controller.api;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gamex.findit.model.Notice;
import com.gamex.findit.service.NoticeService;

@Controller("memberNotice")
public class NoticeController {
	
	private static final Logger logger = LoggerFactory.getLogger(NoticeController.class);
	
	@Autowired NoticeService noticeService;
	
	
	/**
	 * @param request
	 * @param response
	 * @param model
	 * @param notice
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/app/member/notice.*")
	public String notice( HttpServletRequest request
			            , HttpServletResponse response
			            , Model model
			            , @ModelAttribute Notice notice) throws Exception{

		model.addAttribute("list",noticeService.getNotice(notice));
		return "notice/noticeM";
	}

	
}
